package com.ruoyi.topInsectImg.service.impl;

import com.ruoyi.topInsectImg.domain.InsectImg;
import com.ruoyi.topInsectImg.mapper.OpenApiMapper;
import com.ruoyi.topInsectImg.domain.WebFrontEnd;
import com.ruoyi.topInsectImg.service.OpenApiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Mr-Le
 */
@Service
public class OpenApiServiceImpl implements OpenApiService {


    @Autowired
    private OpenApiMapper openApiMapper;

    /**
     * 插入前端所需对象
     * @param webFrontEnd
     * @return
     */
    @Override
    public int insertWebFrontEnd(WebFrontEnd webFrontEnd) {
        return openApiMapper.insertWebFrontEnd(webFrontEnd);
    }

    /**
     * 根据 num 倒序查询数据库Insect信息
     * @param num 数量
     * @return 集合
     */
    @Override
    public List<WebFrontEnd> selectInsectImgByNum(int num) {
        return openApiMapper.selectInsectImgByNum(num);
    }
}
